package p270jp.pxv.android.viewholder;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import p014ae.View$OnClickListenerC0163u;
import p134ei.AnalyticsAction;
import p134ei.PixivAnalytics;
import p134ei.PremiumAnalyticsSource;
import p140eo.C2973b;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.R;
import p270jp.pxv.android.activity.PremiumActivity;
import p314lg.ViewHolderSearchResultPremiumPreviewHeaderFooterBinding;
import p325m0.MutabilityOwnership;
import p368ng.AbstractC5243x0;
import p521th.FlexibleItemAdapterSolidItem;
import p521th.SolidItemViewHolder;

/* compiled from: SearchResultPremiumPreviewHeaderSolidItem.kt */
/* renamed from: jp.pxv.android.viewholder.SearchResultPremiumPreviewHeaderSolidItem */
/* loaded from: classes2.dex */
public final class SearchResultPremiumPreviewHeaderSolidItem extends FlexibleItemAdapterSolidItem {
    public static final int $stable;

    /* compiled from: SearchResultPremiumPreviewHeaderSolidItem.kt */
    /* renamed from: jp.pxv.android.viewholder.SearchResultPremiumPreviewHeaderSolidItem$SearchResultPremiumPreviewHeaderViewHolder */
    /* loaded from: classes2.dex */
    public static final class SearchResultPremiumPreviewHeaderViewHolder extends SolidItemViewHolder {
        public static final Companion Companion = new Companion(null);
        private final PixivAnalytics pixivAnalytics;

        /* compiled from: SearchResultPremiumPreviewHeaderSolidItem.kt */
        /* renamed from: jp.pxv.android.viewholder.SearchResultPremiumPreviewHeaderSolidItem$SearchResultPremiumPreviewHeaderViewHolder$Companion */
        /* loaded from: classes2.dex */
        public static final class Companion {
            private Companion() {
            }

            public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
                this();
            }

            public final SearchResultPremiumPreviewHeaderViewHolder createViewHolder(ViewGroup viewGroup) {
                MutabilityOwnership.m3745m(viewGroup, "parent");
                ViewDataBinding c = DataBindingUtil.m11370c(LayoutInflater.from(viewGroup.getContext()), R.layout.view_holder_search_result_premium_preview_header_footer, viewGroup, false);
                MutabilityOwnership.m3746l(c, "inflate(\n               …lse\n                    )");
                return new SearchResultPremiumPreviewHeaderViewHolder((ViewHolderSearchResultPremiumPreviewHeaderFooterBinding) c, null);
            }
        }

        private SearchResultPremiumPreviewHeaderViewHolder(ViewHolderSearchResultPremiumPreviewHeaderFooterBinding w8Var) {
            super(w8Var.f2666e);
            Context context = this.itemView.getContext();
            MutabilityOwnership.m3746l(context, "itemView.context");
            this.pixivAnalytics = ((AbstractC5243x0) C2973b.m6512b(context, AbstractC5243x0.class)).mo3365R();
            w8Var.f22408q.setOnClickListener(new View$OnClickListenerC0163u(this, 29));
        }

        public /* synthetic */ SearchResultPremiumPreviewHeaderViewHolder(ViewHolderSearchResultPremiumPreviewHeaderFooterBinding w8Var, DefaultConstructorMarker eVar) {
            this(w8Var);
        }

        /* renamed from: _init_$lambda-0 */
        public static final void m12333_init_$lambda0(SearchResultPremiumPreviewHeaderViewHolder searchResultPremiumPreviewHeaderViewHolder, View view) {
            MutabilityOwnership.m3745m(searchResultPremiumPreviewHeaderViewHolder, "this$0");
            searchResultPremiumPreviewHeaderViewHolder.onAboutPremiumButtonClick();
        }

        /* renamed from: a */
        public static /* synthetic */ void m4392a(SearchResultPremiumPreviewHeaderViewHolder searchResultPremiumPreviewHeaderViewHolder, View view) {
            m12333_init_$lambda0(searchResultPremiumPreviewHeaderViewHolder, view);
        }

        private final void onAboutPremiumButtonClick() {
            PixivAnalytics.m6529a(this.pixivAnalytics, 7, AnalyticsAction.PREMIUM_ABOUT_PREMIUM_BUTTON_CLICK_AT_SEARCH_RESULT_POPULAR_TOP, null, 4);
            this.itemView.getContext().startActivity(PremiumActivity.m4769V0(this.itemView.getContext(), PremiumAnalyticsSource.SEARCH_RESULT_POPULAR_TOP));
        }

        @Override // p521th.SolidItemViewHolder
        public void onBindViewHolder(int i) {
        }
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public int getSpanSize() {
        return 2;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public SolidItemViewHolder onCreateViewHolder(ViewGroup viewGroup) {
        MutabilityOwnership.m3745m(viewGroup, "parent");
        return SearchResultPremiumPreviewHeaderViewHolder.Companion.createViewHolder(viewGroup);
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public boolean shouldBeInserted(int i, int i2, int i3, int i4) {
        return i2 == 0;
    }
}
